import http from "~/api/base/http.js";


/**
 * 获取商品分类列表
 * @param page
 * @param size
 * @param projectId
 * @param categoryId
 * @param name
 * @returns {Promise | Promise<unknown>}
 */
export const getCommodityList = (page = 1, size = 10, projectId = "", categoryId = "", name = "") => {
    return http.requestGet("/portal/commodity/list/" + page + "/" + size + "?projectId=" + projectId + "&categoryId=" + categoryId + "&name=" + name);
};

//获取商品分类列表
export const getCommodityCategoryList = (projectId) => {
    return http.requestGet("/portal/commodity-category/list?projectId=" + projectId);
};